{%extends 'template.html'%}
{%block css%}
<link href="/static/css/jquery.dataTables.css" rel="stylesheet" type="text/css">
<link href="/static/css/mycss.css" rel="stylesheet" type="text/css">
{%endblock%}
{%block content%}
<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">{{head.value}}</h1>                
        </div>            
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="btn-group">
                        {% if head.mine%}
                        <a href="/dashboard/flow_add"><button type="button" class="btn btn-primary">增加</button></a>
                        <a><button id='bt-del' type="button" class="btn btn-primary" disabled="true">删除</button></a>
                        {%endif%}
                    </div>                    
                </div>
                <div class="panel-body">
                      <table id="mytable" class="display" width="100%" cellspacing="0">
                          <thead>
                              <tr>
                                  <!-- <th>流程号</th> -->
                                  <th>流程类型</th>
                                  <th>上一节点</th>
                                  <th>申请人</th>
                                  <th>申请理由</th>
                                  <th>到达时间</th>
                                  <th>下一节点</th>
                                  <th>项目</th>
                                  <th>数量</th>
                                  <th>资源类型</th>
                                  <th>操作</th>
                              </tr>
                          </thead>                
                      </table>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">审批</h4>
              </div>
              <div class="modal-body">
                <ul id="modal-list">
                  <li class="form-group">
                    <label class="col-md-3 control-label" for="notes">审批意见</label>
                    <div class="col-md-7">
                      <textarea id="notes" class="form-control" name="notes"></textarea>
                    </div>
                  </li>
                  <br/>
                  <li class="form-group">
                      <label class="col-sm-3 control-label">审批</label>
                      <div class="col-sm-3">
                        <label for="serveradd_allow" onclick="">
                          <input type="radio" value="1" id="allow" name="pass">
                          通过
                          </input>                                
                        </label>
                      </div>
                      <div class="col-sm-3">
                        <label for="serveradd_deny" onclick="">
                          <input type="radio" value="0" id="deny" name="pass">
                          不通过
                          </input>                                
                        </label>
                      </div>
                  </li>
                  <br/>
                  <li class="form-group" id='c_servers'>
                    <div class="col-sm-3">
                      <label class="control-label">服务器</label>
                    </div>
                    <div class="col-sm-8">
                      <select id="servers" style="width:100%" multiple="multiple"></select>
                    </div>
                  </li>                  
                </ul>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id='file-save' type="button" class="btn btn-primary">保存</button>
              </div>
            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->          
    </div>    
</div>
{% include 'detailModal.html' %}
{%endblock%}
{%block bodyjs%}
    <script src="/static/js/jquery.dataTables.js" ></script>
    {{ django_context_varable }}
    {% verbatim %}
    <script id="tpl" type="text/x-handlebars-template">
          {{#each func}}
          	<button type="button" class="btn btn-{{this.type}} btn-sm" onclick="{{this.fn}}">{{this.name}}</button>
          {{/each}} 
    </script>
    {% endverbatim %}
    <script src="/static/js/handlebars-v3.0.1.js"></script>
    <script src="/static/js/unapprove.js"></script>
{%endblock%}